<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/interactivedesigner/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">

    <!-- SimpleStyles.XAML defines a set of control styles which are simplified starting points for creating your own controls -->

    <!-- Brushes : These are used to define the color for background, foreground, selection, enabled etc of all controls
	If you want to change the color of a control you can just chnage the brush; if you want to add a new shape or change arrangement then also edit the template -->

    <!--<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#15428B" />
        <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="#15428B"/>-->


    <LinearGradientBrush x:Key="P2BackgroundBrush" StartPoint="0.5,0" EndPoint="0.5,1" >
        <GradientStop Color="#FF83BBF4" Offset="0"/>
        <GradientStop Color="#FF83BBF4" Offset="0.992"/>
        <GradientStop Color="#FF2873BE" Offset="0.085"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="P2MenuBackgroundBrush" StartPoint="0, 0"  EndPoint="0,1" >
        <GradientStop Color="#D6E8FF" Offset="0"/>
        <GradientStop Color="#D6E8FF" Offset="1"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="MenuBackgroundBrush" StartPoint="0, 0" EndPoint="0,1">
        <GradientStop Color="#E3EFFF" Offset="0" />
        <GradientStop Color="#C4DDFF" Offset="0.40625" />
        <GradientStop Color="#ADD1FF" Offset="0.40625" />
        <GradientStop Color="#C0DBFF" Offset="1" />
    </LinearGradientBrush>

    <!-- NormalBrush is used as the Background for SimpleButton, SimpleRepeatButton -->
    <Style x:Key="TestLabel" TargetType="{x:Type Label}">

        <Setter Property="Background" Value="Red"/>
    </Style>
    <LinearGradientBrush x:Key="NormalBrush" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#EEE" Offset="0.0"/>
        <GradientStop Color="#CCC" Offset="1.0"/>
    </LinearGradientBrush>
    <ControlTemplate x:Key="ErrorTemplate">
        <Border BorderBrush="Red" BorderThickness="1" Padding="2" CornerRadius="2">
            <AdornedElementPlaceholder />
        </Border>
    </ControlTemplate>
    <Style x:Key="P2TextBoxStyle" TargetType="{x:Type TextBox}">
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Margin" Value="0,5,0,5"/>
        <Setter Property="AllowDrop" Value="true"/>
        <Setter Property="HorizontalContentAlignment" Value="left"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBox}">
                    <Grid>
                        <Border x:Name="Border" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="#6893CF" BorderThickness="1" Padding="2" CornerRadius="2">
                            <ScrollViewer Margin="0" x:Name="PART_ContentHost" Style="{DynamicResource SimpleScrollViewer}" Background="{TemplateBinding Background}"/>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Validation.HasError" Value="true">
                            <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="P2ComboBoxStyle" TargetType="{x:Type ComboBox}">

        <!--<Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type TextBox}">
                            <Grid>                                
                                <Border x:Name="Border" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="#6893CF" BorderThickness="1" Padding="2" CornerRadius="2">
                                    <ScrollViewer Margin="0" x:Name="PART_ContentHost" Style="{DynamicResource SimpleScrollViewer}" Background="{TemplateBinding Background}"/>
                                </Border>
                            </Grid>
                        </ControlTemplate>                      
                    </Setter.Value>
                </Setter>-->

        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ErrorTemplate}" />
        <Style.Triggers>
            <Trigger Property="Validation.HasError" Value="True">
                <Setter Property="BorderBrush" Value="Red"/>
                <Setter Property="BorderThickness" Value="1"/>
                <Setter Property="Opacity" Value="0.84"/>

            </Trigger>
            <Trigger Property="IsReadOnly" Value="True">
                <Setter Property="IsEnabled" Value="False" />
            </Trigger>
        </Style.Triggers>
    </Style>



    <!-- AM: For the Menu -->
    <Style x:Key="P2FindMenuStyle" TargetType="{x:Type Menu}" >
        <Setter Property="Background" Value="{StaticResource MenuBackgroundBrush}"/>
        <Setter Property="Height" Value="22"/>
    </Style>

    <Style x:Key="P2FindMenuItemStyle" TargetType="{x:Type MenuItem}" >
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="Margin" Value="0,0,0,0" />
    </Style>

    <Style x:Key="P2MenuStyle" TargetType="{x:Type Menu}" >
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="Height" Value="22"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="Margin" Value="3,3,3,3"/>
    </Style>

    <Style x:Key="P2MenuBorderStyle" TargetType="{x:Type Border}" >
        <Setter Property="BorderThickness" Value="2,2,2,2"/>
        <Setter Property="Margin" Value="5,0,5,5"/>
        <Setter Property="CornerRadius" Value="4,4,4,4"/>
        <Setter Property="BorderBrush" Value="#FF0F68A6"/>
        <Setter Property="Background" Value="{StaticResource MenuBackgroundBrush}"/>
    </Style>


    <Style x:Key="P2MenuItemStyle" TargetType="{x:Type MenuItem}" >
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="Margin" Value="0,0,0,0" />
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Visibility" Value="Collapsed" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="True">
                <Setter Property="Visibility" Value="Visible" />
            </Trigger>

        </Style.Triggers>        
    </Style>



    <!-- AM: Content -->
    <Style x:Key="P2ContentBorderStyle" TargetType="{x:Type Border}" >
        <Setter Property="BorderThickness" Value="2,2,2,2"/>
        <Setter Property="Margin" Value="5,0,5,5"/>
        <Setter Property="CornerRadius" Value="4,4,4,4"/>
        <Setter Property="BorderBrush" Value="#FF0F68A6"/>
        <Setter Property="Background" Value="#FFFCFCFC"/>
    </Style>


    <!-- AM: Status Strip -->
    <Style x:Key="P2StatusStripBorderStyle" TargetType="{x:Type Border}" >
        <Setter Property="BorderThickness" Value="2,2,2,2"/>
        <Setter Property="Margin" Value="5,0,5,3"/>
        <Setter Property="CornerRadius" Value="4,4,4,4"/>
        <Setter Property="BorderBrush" Value="#FF0F68A6"/>
        <Setter Property="Background" Value="#FFFCFCFC"/>
    </Style>


    <Style x:Key="P2StatusStripGridStyle" TargetType="{x:Type Grid}" >
        <Setter Property="Margin" Value="3,3,3,3"/>
        <Setter Property="Background" Value="White"/>
        <Setter Property="Height" Value="22"/>
    </Style>


    <Style x:Key="P2DetailViewHeaderTextStyle" TargetType="{x:Type Label}" >
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="Width" Value="Auto"/>
        <Setter Property="Foreground" Value="#FFFFFFFF"/>
        <Setter Property="FontSize" Value="24"/>
        <Setter Property="FontFamily" Value="Corbel"/>
    </Style>




</ResourceDictionary>
